Implement ranges::is_permutation#892
Merged
StephanTLavavej merged 14 commits intomicrosoft:masterfrom Jun 24, 2020
Merged
Conversation
Includes implementation of concepts `indirect_equivalence_relation` and `indirect_strict_weak_order`, and new `<xutility>` helper `_Find_last_iterator(first, last, count)` which - given `[first, last)` of length `count` - returns the iterator that corresponds to `last`. Drive-by: * Move `std::is_permutation` from `<xutility>` into `<algorithm>`, leaving behind the `_Check_match_counts` helper which is used elsewhere in the STL. * Allow clang-format to handle the algorithm result types since they now have no requires-clauses.
miscco
reviewed
Jun 12, 2020
miscco
reviewed
Jun 12, 2020
miscco
reviewed
Jun 12, 2020
Contributor
miscco
left a comment
There was a problem hiding this comment.
Whenever i see is_permutation i cringe about the cost involved. That said the code is great!
libc++ `unordered_meow` tests were assuming that `#include <unordered_meow>` makes `std::is_permutation` available. Drive-by: Inline 4-argument `_Is_permutation_unchecked` into `is_permutation` since this `_unchecked` overload isn't used elsewhere.
Closed
mnatsuhara
approved these changes
Jun 16, 2020
Contributor
mnatsuhara
left a comment
There was a problem hiding this comment.
I haven't looked at the is_permutation algorithm before -- nifty 😄
StephanTLavavej
requested changes
Jun 16, 2020
miscco
reviewed
Jun 18, 2020
CaseyCarter
commented
Jun 18, 2020
mnatsuhara
approved these changes
Jun 18, 2020
Contributor
mnatsuhara
left a comment
There was a problem hiding this comment.
New test coverage looks great!
Co-authored-by: mnatsuhara <46756417+mnatsuhara@users.noreply.github.com>
... with `_STL_INTERNAL_STATIC_ASSERT` when we don't want to pay the throughput cost of constraints.
StephanTLavavej
approved these changes
Jun 23, 2020
StephanTLavavej
approved these changes
Jun 23, 2020
Member
|
!ahknsT😸 |
ahanamuk
pushed a commit
to ahanamuk/STL
that referenced
this pull request
Jul 1, 2020
Co-authored-by: mnatsuhara <46756417+mnatsuhara@users.noreply.github.com> Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
39 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Includes implementation of concepts
indirect_equivalence_relationandindirect_strict_weak_order, and new<xutility>helper_Find_last_iterator(first, last, count)which - given[first, last)of lengthcount- returns the iterator that corresponds tolast.Drive-by:
std::is_permutationfrom<xutility>into<algorithm>, leaving behind the_Check_match_countshelper which is used elsewhere in the STL.Partially addresses #39.